<%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@taglib prefix="s" uri="http://www.springframework.org/tags"%>
<script type="text/javascript">
	function listAllView() {
		window.location.href = "viewAll.htm";
	}
</script>
<form action="/lb7/cust/edit.htm" method="post">
	<input type="hidden" name="custId"
		value="<c:out value="${cust.customerId}"/>">
	<table>
		<tr align="left">
			<th>Customer Name <span class="required">*</span></th>
			<td><s:bind path="cust.customerName">
					<input name="customerName" value="<c:out value="${status.value}"/>" size="25">
					<span class="error"><c:out value="${status.errorMessage}" />
					</span>
				</s:bind></td>
		</tr>
		<tr align="left">
			<th colspan="2">Contact Person</th>
		</tr>
		<tr align="left">
			<td>Last Name <span class="required">*</span></td>
			<td><s:bind path="cust.contactPerson.lastName">
					<input name="contactPerson.lastName"
						value="<c:out value="${status.value}"/>" size="25">
					<span class="error"><c:out value="${status.errorMessage}" />
					</span>
				</s:bind></td>
		</tr>
		<tr align="left">
			<td>First Name <span class="required">*</span></td>
			<td><s:bind path="cust.contactPerson.firstName">
					<input name="contactPerson.firstName"
						value="<c:out value="${status.value}"/>" size="25">
					<span class="error"><c:out value="${status.errorMessage}" />
					</span>
				</s:bind></td>
		</tr>
		<tr align="left">
			<td>Middle Name <span class="required">*</span></td>
			<td><s:bind path="cust.contactPerson.middleName">
					<input name="contactPerson.middleName"
						value="<c:out value="${status.value}"/>" size="25">
					<span class="error"><c:out value="${status.errorMessage}" />
					</span>
				</s:bind></td>
		</tr>
		<tr align="left">
			<th>Landline <span class="required">*</span></th>
			<td><s:bind path="cust.phone">
					<input name="phone" value="<c:out value="${status.value}"/>" size="15">
					<span class="error"><c:out value="${status.errorMessage}" />
					</span>
				</s:bind></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td><span class="note">Example: (02)1234567</span></td>
		</tr>
		<tr align="left">
			<th>Mobile <span class="required">*</span></th>
			<td><s:bind path="cust.mobile">
					<input name="mobile" value="<c:out value="${status.value}"/>" size="15">
					<span class="error"><c:out value="${status.errorMessage}" />
					</span>
				</s:bind></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td><span class="note">Example: (0918)1234567</span></td>
		</tr>
		<tr align="left">
			<th colspan="2">Resident Address</th>
		</tr>
		<tr align="left">
			<td>Street</td>
			<td><s:bind path="cust.residentAddress.street">
					<input name="residentAddress.street"
						value="<c:out value="${status.value}"/>" size="30">
					<span class="error"><c:out value="${status.errorMessage}" />
					</span>
				</s:bind></td>
		</tr>
		<tr align="left">
			<td>City <span class="required">*</span></td>
			<td><s:bind path="cust.residentAddress.city">
					<input name="residentAddress.city"
						value="<c:out value="${status.value}"/>" size="15">
					<span class="error"><c:out value="${status.errorMessage}" />
					</span>
				</s:bind></td>
		</tr>
		<tr align="left">
			<td>Province <span class="required">*</span></td>
			<td><s:bind path="cust.residentAddress.province">
					<input name="residentAddress.province"
						value="<c:out value="${status.value}"/>" size="15">
					<span class="error"><c:out value="${status.errorMessage}" />
					</span>
				</s:bind></td>
		</tr>
		<tr align="left">
			<td>Zip Code</td>
			<td><s:bind path="cust.residentAddress.zipCode">
					<input name="residentAddress.zipCode"
						value="<c:out value="${status.value}"/>" size="4">
					<span class="error"><c:out value="${status.errorMessage}" />
					</span>
				</s:bind></td>
		</tr>
		<tr>
			<td></td>
			<td>
			<input type="submit" value="Submit">&nbsp;
			<input type="button" value="Cancel" onclick="listAllView()">
			</td>
		</tr>
	</table>
</form>
<span class="required">*</span> Indicates required field.